<!-- 设置面包屑 -->
#set($breadcrumbs = [{"name":"用户管理","url":"$!{base}/role/list"},{"name":"角色列表"}])
<!-- 设置功能描述 -->
#set($feature = {"major":"用户管理","minor":"角色列表"}) 
<!-- 设置导航高亮 -->
#set($subList = "role_list") 
<table class="table table-striped table-bordered table-hover">
	<thead>
		<tr>
			<th colspan="6">
				<div class="row">
					<div class="col-md-3 ">
						<form action="$!{base}/role/search" method="post" class="search-form">
							<div class="input-group">
								<span class="input-group-addon"> 关键词 </span> 
								<input class="form-control search-query" type="text" name="key" value="" data-type="reg" data-reg="/^[\u4e00-\u9fa5\d\w]{1,}$/" data-default="Search..." data-error="请输入搜索关键词" placeholder="请输入角色名检索"> 
								<span class="input-group-addon btn-purple search-btn" id="queryInfo" style="cursor:pointer ;"> 
									<i class="fa fa-search"></i> GO
								</span>
							</div>
						</form>
					</div>
					<div class="col-md-2 col-md-offset-7">
						<button class="btn btn-sm btn-primary pull-right btn-pop" data-url='/role/add' data-width='300' data-height='245' data-title='添加角色' data-btn='false' style="margin-right:45px">
							<i class="fa fa-plus"></i> 添加角色
						</button>
					</div>
				</div>
			</th>
		</tr>
		<tr class="center">
			<th>序号</th>
			<th>角色名</th>
			<th>描述</th>
			<th>操作</th>
		</tr>
	</thead>

	<tbody>
		#foreach($roles in $obj.data.pager.entities)
		<tr>
			<td class="center">$!{roles.id}</td>
			<td>$!{roles.name}</td>
			<td>$!{roles.description}</td>
			<td class="center">
				<div class="hidden-sm hidden-xs btn-group">
					<button class="btn btn-xs btn-success btn-pop" data-url='/role/info/$!{roles.id}' data-width='400' data-height='275' data-title=' 角色$!{roles.name} 详情' data-btn='false'>
						<i class="ace-icon fa fa-check bigger-120"></i>详情
					</button>
					<button class="btn btn-xs btn-pink btn-pop" data-url='/role/setPermission/$!{roles.id}' data-width='800' data-height='440' data-title='设置角色 $!{user.realName} 权限' data-btn='false'>
						<i class="ace-icon fa fa-bolt  bigger-120"></i>设置权限
					</button>
					#if( ! $roles.installed )
					<button class="btn btn-xs btn-info btn-pop" data-url='/role/edit/$!{roles.id}' data-width='500' data-height='500' data-title='编辑角色$!{roles.name} 资料' data-btn='false'>
						<i class="ace-icon fa fa-pencil bigger-120"></i>编辑
					</button>
					<button class="btn btn-xs btn-danger btn-delete" data-url='/role/delete' data-id='$!{roles.id}'>
						<i class="ace-icon fa fa-trash-o bigger-120"></i>删除
					</button>
					#end
				</div>
			</td>
		</tr>
		#end
	</tbody>
	<tfoot>
		#if(${obj.data.pager.count} == 0)
		<tr>
			<td colspan="7" class="null-pager">没有符合条件的数据</td>
		</tr>
		#else
		<tr>
			<td colspan="7">
				<div class="pull-right">$!{obj.data.pager.pagerBar}</div>
			</td>
		</tr>
		#end
	</tfoot>
</table>

